home *** CD-ROM | disk | FTP | other *** search
/ Imekura ROM / Imekura ROM.iso / pc / win / shared.dir / 00911.ls < prev    next >
Encoding:
Text File  |  1995-07-11  |  3.2 KB  |  144 lines

  1. on pictload pictno
  2.   set pictnam to pathName() & "PICT:" & pictno
  3.   set vpictobject to fileio(mnew, "read", pictnam)
  4.   if objectp(vpictobject) then
  5.     set the name of cast 200 to pictno
  6.     set the picture of cast pictno to vpictobject(mreadpict)
  7.     vpictobject(mdispose)
  8.   else
  9.     alert("ERROR:" & vpictobject)
  10.   end if
  11. end
  12.  
  13. on pictset spno, spnum, typeno, inkno, vh, vv
  14.   puppetSprite(spno, 1)
  15.   set the type of sprite spno to typeno
  16.   set the ink of sprite spno to inkno
  17.   set the castNum of sprite spno to the number of cast spnum
  18.   set the locH of sprite spno to vh
  19.   set the locV of sprite spno to vv
  20.   updateStage()
  21. end
  22.  
  23. on playcheck spno
  24.   if the movieTime of sprite spno >= the duration of cast the castNum of sprite spno then
  25.     return 1
  26.   else
  27.     return 0
  28.   end if
  29. end
  30.  
  31. on puppetclear
  32.   global gselect
  33.   repeat with i = 1 to 24
  34.     puppetSprite(i, 0)
  35.   end repeat
  36. end
  37.  
  38. on pushbutton
  39.   set cname to item 1 of the name of cast the castNum of sprite clickOn()
  40.   repeat while stillDown()
  41.     if rollOver(clickOn()) then
  42.       set the castNum of sprite clickOn() to the number of cast (cname & ",DWN")
  43.       set rdata to 1
  44.     else
  45.       set the castNum of sprite clickOn() to the number of cast (cname & ",UPP")
  46.       set rdata to 0
  47.     end if
  48.     updateStage()
  49.   end repeat
  50.   set the castNum of sprite clickOn() to the number of cast (cname & ",UPP")
  51.   updateStage()
  52.   return rdata
  53. end
  54.  
  55. on savefile str
  56.   set myobj to fileio(mnew, "?write", EMPTY)
  57.   if objectp(myobj) then
  58.     myobj(mwritestring, str)
  59.     myobj(msetfinderinfo, "Dtxt", "MMPB")
  60.     myobj(mdispose)
  61.     return 1
  62.   else
  63.     if myobj <> -43 then
  64.       alert(" can't file create :" & fileio(merror, myobj))
  65.     end if
  66.   end if
  67.   return 0
  68. end
  69.  
  70. on lodfile
  71.   global gloadpoint
  72.   set myobj to fileio(mnew, "?read", "TEXT")
  73.   if objectp(myobj) then
  74.     set gloadpoint to myobj(mreadfile)
  75.     myobj(mdispose)
  76.     return 1
  77.   else
  78.     if myobj <> -43 then
  79.       alert("can't file open " & fileio(merror, myobj))
  80.     end if
  81.   end if
  82.   return 0
  83. end
  84.  
  85. on cursorctl spno, stype
  86.   if rollOver(spno) then
  87.     cursorset(spno, stype)
  88.   else
  89.     cursorset(spno, 0)
  90.   end if
  91. end
  92.  
  93. on cursorset spno, stype
  94.   if stype = "S" then
  95.     set the cursor of sprite spno to [804, 811]
  96.   else
  97.     if stype = 0 then
  98.       set the cursor of sprite spno to -1
  99.     end if
  100.   end if
  101. end
  102.  
  103. on playmovie
  104.   puppetSprite(4, 0)
  105.   puppetSprite(5, 1)
  106.   puppetSprite(6, 0)
  107.   set the castNum of sprite 5 to the number of cast "PLAY,DWN"
  108.   set the movieRate of sprite 7 to 1
  109. end
  110.  
  111. on ffmovie
  112.   puppetSprite(4, 0)
  113.   puppetSprite(5, 0)
  114.   puppetSprite(6, 1)
  115.   set the castNum of sprite 6 to the number of cast "FF,DWN"
  116.   set the movieRate of sprite 7 to 2
  117. end
  118.  
  119. on stmovie
  120.   puppetSprite(4, 1)
  121.   puppetSprite(5, 0)
  122.   puppetSprite(6, 0)
  123.   set the castNum of sprite 4 to the number of cast "PAUSE,DWN"
  124.   set the movieRate of sprite 7 to 0
  125. end
  126.  
  127. on soundset
  128.   set cname to item 2 of the name of cast the castNum of sprite clickOn()
  129.   if cname = "UPP" then
  130.     puppetSprite(3, 1)
  131.     set the castNum of sprite 3 to the number of cast "SOUND,DWN"
  132.     set the volume of sprite 7 to 255
  133.   else
  134.     puppetSprite(3, 0)
  135.     set the volume of sprite 7 to 0
  136.   end if
  137. end
  138.  
  139. on clearpuppet
  140.   repeat with i = 1 to 24
  141.     puppetSprite(i, 0)
  142.   end repeat
  143. end
  144.